package com.bawei.a2209_mianshi.ui.mall.view

import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.bawei.a2209_mianshi.R
import com.bawei.a2209_mianshi.base.BaseActivity
import com.bawei.a2209_mianshi.databinding.ActivityMallBinding
import com.bawei.a2209_mianshi.ui.mall.viewmodel.MallViewModel
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class MallActivity : BaseActivity<MallViewModel,ActivityMallBinding>() {
    private val viewModel:MallViewModel by viewModels()
    override val mLayoutResId: Int
        get() = R.layout.activity_mall


    override fun initData() {
        viewModel.cmallAdInfo()
    }

    override fun initListener() {
        //状态管理
        addCommonStateListener(viewModel.mallAdInfoStateFlow)
        viewModel.mallAdInfoLiveData.observe(this){
            showToast(it.toString())
        }
    }


}